package com.glsc.ngateway.common.base.repo.mysql.gateway.platform;


import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.FaxRecv;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface FaxRecvRepo extends JpaRepository<FaxRecv, Long>, JpaSpecificationExecutor<FaxRecv> {

    @Transactional//事务的注解
    @Modifying//增删改必须有这个注解
    @Query(value = "update t_fax_recv_table set is_download = 1  where file_path = :filePath", nativeQuery = true)
    int updateDownload(String filePath);

}
